<template>
	<view class="body">
		<xk-header title="报修抽查"></xk-header>
		<view class="list" >
			<view class="list-item header" @click="orderMore = !orderMore">
				<view>工单号:  XC202105190001</view>
				<image v-if="!orderMore" src="/static/up.png"></image>
				<image v-else  src="/static/down.png"></image>
			</view>
			<view v-if="orderMore" class="data-item">
				<view class="order-info">
					<view class="info-item"><view class="key">设备信息：</view>DY2021050001-A1-7室外主机</view>
					<view class="info-item"><view class="key">故障描述：</view>室外主机报故障H0</view>
					<view class="info-item"><view class="key">设备地址：</view><text>A1-7室外主机报故障H0</text></view>
					<view class="info-item"><view class="key"></view>
						<image-list :pics="'/static/temp/temp.jpeg'"></image-list>
					</view>
				</view>
			</view>
		</view>
		<view class="list" >
			<view class="list-item header" @click="orderMore = !orderMore">
				<view>维修处理</view>
				<image v-if="!orderMore" src="/static/up.png"></image>
				<image v-else  src="/static/down.png"></image>
			</view>
			<view v-if="orderMore" class="data-item">
				<view class="order-info">
					<view class="info-item"><view class="key">维修人：</view>黄琳</view>
					<view class="info-item"><view class="key">维修种类：</view>201、业户单元空调检修</view>
					<view @click="viewDetail" class="info-item" style="justify-content: space-between;">
						<view class="key">工单材料：</view>
						<view style="display: flex; align-items: center;">
							<text class="right-title1" style="color: #2C72FF;">查看明细</text>
							<image mode="aspectFill" class="jiantou" src="/static/jiantou.png"/>
						</view>
					</view>
					<view class="info-item"><view class="key">支付方：</view>物业</view>
					<view class="info-item"><view class="key">工作时长(小时)：</view>5</view>
					<view class="info-item"><view class="key">费用工时(小时)：</view>5</view>
					<view class="info-item"><view class="key">结算金额(元)：</view>1200</view>
					<view class="info-item"><view class="key">保修时间：</view>2021-08-19 12:32 - 10:30</view>
					<view class="info-item"><view class="key">是否超时：</view>否</view>
					<view class="info-item"><view class="key">处理图片：</view>
						<image-list :pics="'/static/temp/temp.jpeg'"></image-list>
					</view>
				</view>
			</view>
		</view>

		<view class="list">
			<view class="list-item header">
				<view>报修抽查</view>
			</view>
			<view>
				<view class="list-item">
					<view>抽查意见：</view>
					<input class="input-item" type="number" v-model="formInfo.work_time" placeholder="请输入抽查意见" placeholder-class="placeholder"/>
				</view>
				<view class="list-item textarea">
					<view>备注：</view>
					<textarea v-model="formInfo.record_remark" placeholder="备注" placeholder-class="placeholder"/>
				</view>
			</view>
		</view>
		<view class="common-bottom-view">
			<view class="common-btn btn-plant" @click="reportRepair">退回</view>
			<view class="common-btn" @click="doneRepair">通过</view>
		</view>
		<view class="common-zw"></view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				orderMore: true,
				optionNum: 2,
				swiperHeight: 624,
				touchable: true, //禁止手指滑动切换
				duration: 500, //滑动时长
				current: 0, //当前显示的下标
				formInfo: {
					materials:[]
				},
				uploadImgs: [
					"/static/temp/temp.jpeg",
					"/static/temp/temp.jpeg",
				],
			};
		},
		onShow(){
			// this.setSwiperHeight()
		},
		methods:{
			viewDetail(){
				uni.navigateTo({
					url: '/pagesA/facility-fix/facility-fix-material?type=view&mateList=' + ''//JSON.stringify(this.data.materials)
				})
			},
			// nextOption(){
			// 	if(this.current + 1 < this.optionNum){
			// 		this.current += 1;
			// 	}
			// },
			// swiperTab(e) {
			// 	this.current = parseInt(e.target.current);
			// 	this.setSwiperHeight()
			// },
			// setSwiperHeight() {
			// 	console.log('222222h')
			// 	this.$util.getElRect('.swiper-item').then(res=>{
			// 		console.log(res)
			// 		this.swiperHeight = res.height;
			// 	})

			// },
			finishPatrol(){
				uni.navigateTo({
					url: '/pagesA/facility-patrol/facility-patrol-finish'
				})
			},
			reportRepair(){
				uni.navigateTo({
					url: '/pagesC/report-repair/report-repair-form'
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
@import '@/common/from.scss';

// .swiper-item{}
.result-item{
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding-bottom: 20rpx;
	.radio{
		display: flex;
		.r-item{
			display: flex;
			align-items: center;

			margin-right: 40rpx;
		}
	}
}

</style>
